#ifndef  __PARTMAIN_H__     // Begin 'include-guard' block
#define  __PARTMAIN_H__     // (See #endif at the very end of this file).
// I use 'include guards' on every .h file, ahighly recommended practice for
// all C/C++ coding.  Include guards ensure that anything (var,struct,class)
// defined in your .h files will only get defined only once during compiling,
// even if that .h file gets '#include'-ed in many other files in your project.
// It makes your file 'idempotent'.  Otherwise, these multiple definitions will
// stop and/or generate errors in simpler, stricter, (usually older) and less
// forgiving compilers/linkers. See: http://en.wikipedia.org/wiki/Include_guard
//  **** DON'T FORGET THE #endif at this file's end!! ****

//==============================================================================
//3456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_
//                               (why all the numbers? I prefer 80-column text)
//
//      _partMain.h  'host' program for particle systems;
//                    See bottom of CPartSys.h for detailed explanation
//
//==============================================================================

// multi-platform includes for the GLUT/OpenGL libraries:-----------------------
#if defined(_WIN32)
#include <GL\glew.h>        // OpenGL 'extensions wrangler' for easy access.
#include <GL\freeglut.h>// open-source GLUT functions for windows, keybd, mouse
/*---*OR*--- use:
// #include <GL/glut.h> // for 100% backwards-compatibility with Mark Kilgard's
                        // SGI-copyrighted GLUT library. Careful! this excludes
                        // freeglut's callbacks for mouse wheel, etc.
*/
/*
// freeglut.h already contains these other includes that were necessary for
// using Kilgard's original GLUT library:
#include <GL/GL.h>          // OpenGL 3D graphics rendering functions
#include <GL/Glu.h>         // OpenGL utilties functions
#include <GL/glext.h>       // #defines for all OpenGL features on your machine.
*/
#elif defined(__APPLE__)
#include <GLUT/glut.h>      // GLUT functions for windows, keybd, mouse
#include <OpenGL/GL.h>      // OpenGL 3D graphics rendering functions
#include <OpenGL/Glu.h>     // OpenGL utilties functions
#include <OpenGL/GLext.h>   // #defines for all OpenGL features on your machine.
// UNIX, Linux of all flavors;
#else
#include <unistd.h>         // defines symbolic constants, POSIX versions, etc.
#include <GL/glew.h>        // OpenGL 'extensions wrangler' for 'mesa' lib usage
#include <GL/freeglut.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glext.h>
#endif
//-----------------------------end multi-platform includes for GLUT/OpenGL------

//====================
//
// Globally Defined LITERALS:
//
//====================

#define NU_TITLE	"EECS351-2 Particle System Starter"	// Display window's title bar:
#define NU_WIDTH	640						// initial window size in pixels
#define NU_HEIGHT	480
#define NU_XPOS		  0						// initial window position
#define NU_YPOS		  0
#define NU_ZNEAR	1.0						// near, far clipping planes for
#define NU_ZFAR		50.0					// a 3D camera in OpenGL.

// C++ math, I/0 libraries (defined in the 'std' namespace)====================
#include <cmath>            // for transcendentals: pow, sin, cos, tan, etc.
#include <iostream>         // for cin, cout...
using namespace std;        // to access iostream's namespace

#include "CTransRot.h"      // class for mouse-controlled translation/rotation
#include "CPartSys.h"       // Master particle system include.
//====================
//
//	C Function Prototypes  (these belong in a '.h' file if we have one)
//
//====================

void my_glutSetup(int *argc, char **argv);	// GLUT initialization
void my_oglSetup();							// OpenGL initialization
void my_printHelp(void);                    // print user instructions
void setCamera(void);                       // re-set openGL camera's intrinsic
                                            // params-- field of view, etc.

		// GLUT callback functions. Called when:
void myDisplay(void);					// GLUT says re-draw the display window.
void myReshape(int w, int h);			// GLUT says window was re-sized to w,h
void myKeyboard(unsigned char key, int x, int y); //GLUT says user pressed a key
void myKeySpecial(int key, int x, int y);// GLUT says user pressed 'special' key
void myMouseMove(int xpos,int ypos);    // GLUT says user moved the mouse to..
void myMouseClik(int buttonID,int upDown,int xpos,int ypos);
                                        // GLUT says user click/dragged mouse
void myIdle(void);                      // GLUT says "all tasks completed".

#endif //end of #ifndef  __PARTMAIN_H__ include guard
